package model

import "time"

const (
	SEX_WOMEN  = "W"
	SEX_MAN    = "M"
	SEX_UNKNOW = "U"
)

type User struct {
	ID     uint   `gorm:"primaryKey" form:"id" json:"id"`
	Mobile string `gorm:"type:varchar(20)" form:"mobile" json:"mobile"`
	// password = password + salt
	PassWord string `gorm:"type:varchar(40)" form:"password" json:"password"`
	Avatar   string `gorm:"type:varchar(150)" form:"avatar" json:"avatar"`
	Sex      string `gorm:"type:varchar(2)" form:"sex" json:"sex"`
	NickName string `gorm:"type:varchar(20)" form:"nickname" json:"nickname"`
	//随机数
	Salt     string    `gorm:"type:varchar(10)" form:"salt" json:"salt"`
	Online   int       `gorm:"type:int(10)" form:"online" json:"online"`
	ToKen    string    `gorm:"type:varchar(40)" form:"token" json:"token"`
	Memo     string    `gorm:"type:varchar(140)" form:"memo" json:"memo"`
	CreateAt time.Time `gorm:"type:datetime" form:"createat" json:"createat"`

}
